]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
extensions-tool: Use g_string_free_and_steal() where appropriate
authorFlorian Müllner <fmuellner@gnome.org>
Sat, 25 Apr 2026 01:21:12 +0000 (03:21 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sun, 2 Aug 2026 16:48:17 +0000 (18:48 +0200)
It has clearer semantics than `g_string_free (..., FALSE)`.

Spotted by gobject-linter: use_g_string_free_and_steal

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4193>
(cherry picked from commit 9edfd22b968b729d92f2098349f803b4c1c23715)

subprojects/extensions-tool/src/command-create.c

index bea1908342275499f10df4db463341fb307e3ad5..00e96cb22336eed266ae332c50ce14e5f10776e2 100644 (file)
@@ -128,7 +128,7 @@ escape_json_string (const char *string)
         }
     }
 
-  return g_string_free (escaped, FALSE);
+  return g_string_free_and_steal (escaped);
 }
 
 static gboolean